<template>
  <div class="payment-success-container">
    <el-card class="box-card">
      <!-- 成功图标 -->
      <div class="icon-container">
        <el-icon :size="80" color="#67C23A">
          <CircleCheckFilled />
        </el-icon>
      </div>

      <!-- 标题 -->
      <h1 class="title">支付成功！</h1>

      <!-- 操作按钮 -->
<!--      <div class="button-section">
        <el-button type="primary" size="large" @click="goHome">
          返回首页
        </el-button>
        <el-button size="large" @click="viewOrder">
          查看订单
        </el-button>
      </div>-->
    </el-card>
  </div>
</template>

<script>
import { CircleCheckFilled } from '@element-plus/icons-vue'

export default {
  name: 'PaymentSuccess',
  components: {
    CircleCheckFilled
  },
  data() {
    return {
      // 示例数据，实际项目中可能从路由参数或 API 获取
      amount: '99.00',
      orderNo: '202509091037123456',
      paymentTime: new Date().toLocaleString(),
      paymentMethod: '微信支付'
    }
  },
  methods: {
    goHome() {
      // 跳转到首页
      this.$router.push('/')
    },
    viewOrder() {
      // 跳转到订单详情页
      this.$router.push('/order/list')
    }
  }
}
</script>

<style scoped>
.payment-success-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: 20px;
}

.box-card {
  width: 100%;
  max-width: 500px;
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon-container {
  margin-bottom: 20px;
}

.title {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
  font-weight: 500;
}

.button-section {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* 响应式设计 */
@media (max-width: 576px) {
  .box-card {
    max-width: 100%;
    padding: 30px 15px;
  }
  .title {
    font-size: 24px;
  }
  .button-section {
    flex-direction: column;
  }
  .el-button {
    width: 100%;
  }
}
</style>